﻿using QFramework;
using UnityEngine;

public class HK_UseAutoRun : MonoBehaviour, IController
{
    bool isShowGUI = false;

    public IArchitecture GetArchitecture()
    {
        return HKAutoRun_Architecture.Interface;
    }
#if NET_4_6
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.F9))
        {
            isShowGUI = !isShowGUI;
        }
    }

    void OnGUI()
    {
        if (!isShowGUI) return;

        if (GUILayout.Button("设置 自动启动"))
        {
            this.GetSystem<IHK_AutoRunSystem>().SetupAutoRun();
        }

        if (GUILayout.Button("取消 自动启动"))
        {
            this.GetSystem<IHK_AutoRunSystem>().CancelAutoRun();
        }
    }
#endif
}
